package vn.com.aptech.msh.criteria;

import java.io.Serializable;
import vn.com.aptech.msh.entities.HouseType;

/**
 *
 * @author trietto
 */
public class PayingGuestCriteria implements Serializable {

    private String city = "";
    private String location = "";
    private double depositMin = 0;
    private double depositMax = 0;
    private double rentMin = 0;
    private double rentMax = 0;

    public PayingGuestCriteria() {
    }

    public void finish() {
        if (city == null) city = "";
        if (location == null) location = "";
        city = "%" + city + "%";
        location = "%" + location + "%";
        if (depositMin == 0) {
            depositMin = -Double.MAX_VALUE;
        }
        if (depositMax == 0) {
            depositMax = Double.MAX_VALUE;
        }
        if (rentMin == 0) {
            rentMin = -Double.MAX_VALUE;
        }
        if (rentMax == 0) {
            rentMax = Double.MAX_VALUE;
        }
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public double getDepositMax() {
        return depositMax;
    }

    public void setDepositMax(double depositMax) {
        this.depositMax = depositMax;
    }

    public double getDepositMin() {
        return depositMin;
    }

    public void setDepositMin(double depositMin) {
        this.depositMin = depositMin;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public double getRentMax() {
        return rentMax;
    }

    public void setRentMax(double rentMax) {
        this.rentMax = rentMax;
    }

    public double getRentMin() {
        return rentMin;
    }

    public void setRentMin(double rentMin) {
        this.rentMin = rentMin;
    }
}
